package com.aididi.controller;

import com.aididi.annotation.LogAnnotation;
import com.aididi.service.ISysLogService;
import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Auther: zx.xu
 * @Description:     日志controller
 */
@RestController
@Slf4j
public class SysLogController {

    @Autowired
    private ISysLogService logService;

    @RequestMapping("/aop")
    @ResponseBody
    @LogAnnotation("测试aoplog")
    public Object aop(String name, String nick) {
        Map<String, Object> map =new HashMap<>(8);
        log.info("我被执行了！");
        map.put("res", "ok");
        return map;
    }
}
